package com.marvels.approve.loan.service;

import com.marvels.approve.common.dto.InsurancePolicyDTO;
import com.marvels.approve.loan.dto.McamAcLoanApplyBdInfo;
import com.marvels.approve.loan.dto.McamLoanApplyInfoDTO;
import com.marvels.common.exception.MarvelsBusinessException;

import java.util.List;
/**
 * 保单
 * @author zhaosa
 *
 */
public interface McamLoanInsurancePolicyInfoService {
	/**
	 * 保存保单
	 * @param loan
	 * @param isNeeedQueryCache
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public int saveAssureBx(McamLoanApplyInfoDTO loan,boolean isNeeedQueryCache)throws MarvelsBusinessException;
	/**
	 * 更新保险
	 * @param insurancePolicyDto
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public int updateAssureBx(McamAcLoanApplyBdInfo insurancePolicyDto)throws MarvelsBusinessException;
	/**
	 * 查询担保公司对应的保单
	 * @param loanId
	 * @param companyCode
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public InsurancePolicyDTO selectInsuranceByLoanIdAndCompany(String loanId, String companyCode)throws MarvelsBusinessException;
	/**
	 * 查询保单信息
	 * @param loanId
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public List<InsurancePolicyDTO> selectInsuranceByLoanId(String loanId)throws MarvelsBusinessException;
	
	/**
	 * 获取保单金额（试算）
	 * @param loanApplyInfoDto
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public List<InsurancePolicyDTO> getBdInfoList(InsurancePolicyDTO loanApplyInfoDto) throws MarvelsBusinessException;
	/**
	 * 生成保单信息
	 * @param loanApplyInfoDto
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public int generateBdInfo(McamLoanApplyInfoDTO loanApplyInfoDto) throws MarvelsBusinessException;
	/**
	 * 修改保单密码
	 * @param loanApplyInfoDto
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public Integer modifyBdPassword(InsurancePolicyDTO loanApplyInfoDto) throws MarvelsBusinessException;
}
